Skip to content

Add generalize plots and statistical tests#395

Merged
AnilSorathiya merged 26 commits intomainfrom
anilsorathiya/sc-11380/add-generlize-plots-and-statistical-tests
Aug 6, 2025
Merged

Add generalize plots and statistical tests#395
AnilSorathiya merged 26 commits intomainfrom
anilsorathiya/sc-11380/add-generlize-plots-and-statistical-tests

Conversation

@AnilSorathiya
Copy link
Contributor

@AnilSorathiya AnilSorathiya commented Jul 23, 2025

Pull Request Description

Generalized plots and statistical tests can be leveraged to support result interpretation and enhance documentation clarity.

What and why?

Generalized plots and statistical tests can be leveraged to support result interpretation and enhance documentation clarity.

How to test

  • run tests: notebooks/code_sharing/plots_and_stats_demo.ipynb

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@AnilSorathiya AnilSorathiya added the enhancement New feature or request label Jul 24, 2025
@AnilSorathiya AnilSorathiya marked this pull request as ready for review July 24, 2025 13:50
@github-actions
Copy link
Contributor

PR Summary

This PR introduces a new demonstration Jupyter notebook and a suite of tests that expand the ValidMind library’s analytical capabilities. The demo notebook (plots_and_stats_demo.ipynb) provides end-to-end examples for exploring data using both visualization and statistical analysis methods. It showcases interactive plots such as correlation heatmaps, histograms, box plots, and violin plots, alongside statistical tests including descriptive statistics, correlation analysis, normality tests, and outlier detection.

New test modules have been added under two categories: "plots" and "stats". The plotting tests include modules for rendering box plots, correlation heatmaps, histograms, and violin plots. The statistical tests extend functionalities to compute descriptive statistics, perform correlation analysis with significance testing, run multiple normality tests, and detect outliers using several methods (IQR, Z-score, and Isolation Forest).

Each module introduces thorough parameter validation, comprehensive documentation within docstrings, and clear error handling (e.g., using SkipTestError for invalid input scenarios). The test provider registry has been updated to include the new categories ensuring that the tests integrate seamlessly with the existing ValidMind test framework. Overall, this update enhances exploratory data analysis capabilities and provides a robust, interactive demonstration for end users and developers alike.

Test Suggestions

  • Run the demo notebook end-to-end to verify that all plots and statistical outputs render successfully and interactively.
  • Unit test each new module with valid data to ensure that all customization options (e.g., colors, grouping, threshold parameters) are applied correctly.
  • Validate error handling by providing datasets with missing required columns or constant values to trigger SkipTestError exceptions.
  • Test edge cases such as datasets with very high dimensionality or non-numeric columns to ensure graceful degradation.
  • Verify that the registration of test providers now correctly includes the new 'plots' and 'stats' categories.

@cachafla
Copy link
Contributor

Adding @juanmleng and @johnwalz97 to collect some feedback. I like the idea of reusable plots and stats but I wonder if they should be tests or maybe we should think about another primitive that can be reused by any test? 🤔

Copy link
Contributor

@johnwalz97 johnwalz97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great

@AnilSorathiya AnilSorathiya changed the title Add generlize plots and statistical tests Add generalize plots and statistical tests Aug 6, 2025
@AnilSorathiya AnilSorathiya merged commit 18a7cac into main Aug 6, 2025
8 checks passed
@AnilSorathiya AnilSorathiya deleted the anilsorathiya/sc-11380/add-generlize-plots-and-statistical-tests branch August 6, 2025 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants